package cc.vv.btpartyjob.homepage.delegate

import android.widget.TextView
import cc.vv.baselibrary.view.BaseTopBarView
import cc.vv.baselibrary.view.BtWebView
import cc.vv.btpartyjob.homepage.R
import cc.vv.mvp.delegate.BaseAppDelegate

/**
 * 通知公告详情托管类
 * Created by Chen.qi on 2018/10/24.
 */
class NoticeDetailActivityDelegate : BaseAppDelegate() {

    override fun initWidget() {
    }

    override fun initLayoutRes(): Int {
        return R.layout.activity_notice_details
    }


    /**设置标题右边按钮点击事件*/
    fun setTitleBackBtnOnClick(event: BaseTopBarView.EventInterface) {
        val titleBar = getView<BaseTopBarView>(R.id.btv_and_top_bar)
        titleBar?.setEventInterface(event)
    }

    /**设置标题右边按钮点击事件*/
    fun setTitleBar(title: String) {
        val titleBar = getView<BaseTopBarView>(R.id.btv_and_top_bar)
        titleBar?.setTitle(title)
    }

//    /**
//     * 设置标题
//     */
//    fun setTitle(title: String?) {
//        val titleView = getView<TextView>(R.id.tv_and_title)
//        titleView?.text = title
//    }
//
//    fun setTime(time: String?) {
//        val timeView = getView<TextView>(R.id.tv_and_info)
//        timeView?.text = time
//    }

    fun setVebView(url: String?) {
        val webView = getView<BtWebView>(R.id.bt_and_viewView)
        webView?.loadUrl(url)
    }


}